//
//  ContentTableViewCell.m
//  HandWork
//
//  Created by 王阳阳 on 16/1/21.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ContentTableViewCell.h"

@implementation ContentTableViewCell

- (void)dealloc
{
    [_bgimg release];
    [_titleLabel release];
    [_smallbgimg release];
    [_tuijianimg release];
    [super dealloc];
}
#pragma mark - 初始化
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creat];
    }
    return self;
}
- (void)creat
{
    //图片
    self.bgimg = [[UIImageView alloc]init];
    [self.contentView addSubview:self.bgimg];
    [_bgimg release];
    //标题
    self.titleLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.titleLabel];
    [_titleLabel release];
    //灰色图片 没有做
    self.smallbgimg = [[UIImageView alloc]init];
    [self.contentView addSubview:self.smallbgimg];
    [_smallbgimg release];
    //推荐
    self.tuijianimg = [[UIImageView alloc]init];
    [self.contentView addSubview:self.tuijianimg];
    [_tuijianimg release];
}
#pragma mark - 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    //图片
    self.bgimg.frame = CGRectMake(5, 5, [UIScreen mainScreen].bounds.size.width - 10, 190);
    self.bgimg.layer.cornerRadius = 5;
    self.bgimg.clipsToBounds = YES;
    //标题
    self.titleLabel.frame = CGRectMake(5, 170, [UIScreen mainScreen].bounds.size.width-10, 30);
    self.titleLabel.textColor = [UIColor whiteColor];
    //图片
    self.smallbgimg.frame = CGRectMake(0, 150, [UIScreen mainScreen].bounds.size.width, 50);
    //推荐
    self.tuijianimg.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - 50, 0, 50, 50);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
